<template>
  <LimitBrandsTable
    :listData="clomuns"
    :list="viewData"
    :target="target"
    :user_type="user_type"
  ></LimitBrandsTable>
</template>
<script>
import LimitBrandsTable from './LimitBrandsTable'
export default {
  components: {
    LimitBrandsTable
  },
  props: {
    list: '',
    user_type: ''
  },
  data() {
    return {
      clomuns: [{
        field_name: '操作'
      }],
      viewData: [],
      target: {}
    }
  },
  methods: {
    init(data) {
      this.clomuns.push(...data) 
      let todo = []
      let target = {}
      data.forEach(item => {
        let li = item.field_name_py
        target[li] = ''
        // todo.push(...target)
      })
      if (!this.viewData.length)this.viewData.push(target)
      this.target = JSON.parse(JSON.stringify(target))
      // console.log(this.viewData)
    }
  }
}
</script>